import {createBrowserRouter} from "react-router-dom";
import Login from "@/pages/Login/index.jsx";
import Layout from "@/pages/Layout/index.jsx";
import NotFound from "@/components/NotFound.jsx";
import Material from "@/pages/Layout/Material/index.jsx";
import Equipment from "@/pages/Layout/Equipment/index.jsx";
import AuthRoute from "@/components/AuthRoute/index";
import Test from "@/Test/index.jsx";

const router=createBrowserRouter([
    {
        path:'login',
        element:<Login/>
    },
    {
        path:'/',
        element: <AuthRoute> <Layout/></AuthRoute> ,
        children:[
            {
                path:'/material',
                element:<AuthRoute><Material/></AuthRoute>
            },
            {
                path:'/equipment',
                element:<AuthRoute><Equipment/></AuthRoute> 
            },
        ]
    },
    {
      path:'/test',
      element:<Test/>
    },

    {
        path:'*',
        element:<NotFound/>
    }
])

export default router;